package com.koron.ticket.work.workend.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.koron.ticket.work.workflow.bean.WorkFlow;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
public class WorkEnd {

    @ApiModelProperty(value = "ID")
    private String id;

    @ApiModelProperty(value = "工作票id")
    private String workTicketId;

    @ApiModelProperty(value = "终结方式")
    private String type;

    @ApiModelProperty(value = "流程节点")
    private Integer status;

    @ApiModelProperty(value = "终结信息")
    private String endInformation;

    @ApiModelProperty(value = "终结备注")
    private String endDescription;

    @ApiModelProperty(value = "水司备注")
    private String remark;

    @ApiModelProperty(value = "终结时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date endTime;

    @ApiModelProperty(value = "删除标志：0-在使用；1-已删除")
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建人ID", hidden = true)
    private String createUserId;

    @ApiModelProperty(value = "创建人姓名", hidden = true)
    private String createUserName;

    @ApiModelProperty(value = "创建时间", hidden = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "最后修改时间", hidden = true)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 下面为了业务增加的字段
     */
    @ApiModelProperty(value = "签名列表")
    private List<WorkFlow> workFlowList;

    @ApiModelProperty(value = "仅用于工作票提交中的业务，与原数据中的id冲突")
    private String workEndId;
}
